package com.squid.base.common.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import java.util.Date;

/**
 * 常见实体
 *
 * @author jinhang1
 * @date 2024/06/26
 */
@Data
public class CommonEntity {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除(0 未删除,1删除)
     */
    @TableField(value = "delete_token")
    @TableLogic(value = "0", delval = "1")
    private Integer deleteToken;

    /**
     * 启动（0未启用，1启用)
     */
    @TableField(value = "enable_token")
    private Integer enableToken;
}
